//
//  HomeTableViewController.swift
//  Weibo
//
//  Created by mac on 16/1/13.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit
import AFNetworking
import SVProgressHUD

class HomeTableViewController: BaseTableViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        visitroLoginView?.setupUIWithInfo("nil", tipText: "关注一些人，回这里看看有什么惊喜")
        
        demo()
    }
    
    func demo()
    {
        let urlString = "http://www.weather.com.cn/data/sk/101010100.html"
        let AFN = AFHTTPSessionManager()
        AFN.responseSerializer.acceptableContentTypes?.insert("text/html")
        SVProgressHUD.showInfoWithStatus("正在加载网络数据...")
        AFN.GET(urlString, parameters: nil, progress: nil, success: { (task, result) -> Void in
            SVProgressHUD.dismiss()
            print(result)
            }) { (task, error) -> Void in
                SVProgressHUD.showErrorWithStatus("请检查网络...")
                print(error)
        }
    }
    
}
